package com.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.pojo.sms.Sms_Sku_Ladder;
import com.shop.utils.Sku_ManJian;
import org.apache.ibatis.annotations.Select;

import java.util.List;

//商品阶梯价格
public interface Sms_Sku_Ladder_Mapper extends BaseMapper<Sms_Sku_Ladder> {

    //后台显示优惠卷满减活动信息
    @Select("select s.id as reduction_id,s.full_price as full_price,s.reduce_price as reduce_price,s.add_other as add_other, " +
            "s1.id as ladder_id,s1.full_count as full_count,s1.discount as discount,s1.price as price,s1.add_other as add_others " +
            "from sms_sku_full_reduction as s " +
            "inner join sms_sku_ladder as s1 " +
            "on s.sku_id = s1.sku_id" +
            " where s.sku_id = #{sku_id}")
    Sku_ManJian find_admin_ManJian_All(Long sku_id);
}
